package light.network;

import java.io.IOException;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.CompletionHandler;

public abstract class EndpointSession {

	public String getId(){
		return null;
	}
	public abstract void send(ByteBuffer buf) throws IOException;
	public abstract void send(Packet pack) throws IOException;
	public abstract void send(Packet src, Object attachment, final CompletionHandler<Integer, Object> handler) throws IOException;
	public abstract void close() throws IOException;
	
	public abstract SocketAddress getRemoteAddress() throws IOException;
	public abstract SocketAddress getLocalAddress() throws IOException;
}
